<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="tiao">1</div>
<input type="button" value="改变" onclick="change()">
<script>
    function change() {
       tiao.innerHTML="<img src='https://www.baidu.com/img/bd_logo1.png'/>";
       // tiao.innerHTML="2";
    }
</script>
<br/>
<br/>
<input type="password"  placeholder="请输入密码" id="mima">
<input type="button" value="登录" onclick="denglu()">
<div id="xianshi"></div>
<script>
    function denglu() {
        if (mima.value==123){
            xianshi.innerHTML="登录成功!!!";
        } else{
            xianshi.innerHTML="登录失败!!!";
        }

    }
</script>
<br/>
<br/>
<input type="password"  placeholder="请输入单词" id="danci">
<input type="button" value="查询" onclick="cha()">
<div id="search"></div>
<script>
    function cha() {
        if (danci.value=="cat"){
            // search.innerHTML="猫";
            search.innerHTML="<img src='https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=1667994205,255365672&fm=5'/>";
        } else if (danci.value=="dog") {
            search.innerHTML="<img src='https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2300875363,445064071&fm=5'>";
        }else if (danci.value=="tu"){
            search.innerHTML="<img src='https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=935429962,340930374&fm=58'>";
        } else{
            search.innerHTML="你输入的单词查询不到";
        }
    }
</script>
<br/>
<br/>
<input type=""  placeholder="请输入月份" id="month">
<input type="button" value="显示天数" onclick="search()">
<div id="dl"></div>
<script>
    function search() {
        if (month.value=="1"||month.value=="3"||month.value=="5"||month.value=="7"||month.value=="8"||month.value=="10"||month.value=="12"){
            dl.innerHTML="31天";
        }else if (month.value=="2"||month.value=="4"||month.value=="6"||month.value=="9"||month.value=="11"){
            dl.innerHTML="30天";
        } else{
            dl.innerHTML="输入的月份不存在";
        }
    }
</script>
<br/>
<br/>
<input placeholder="请输入月份" id="i">
<input type="button" value="显示天数" onclick="s()">
<div id="shuzu"></div>
<script>
    var days=[31,30,31,30,31,30,31,31,30,31,30,31];
    function s() {
        var yf = i.value;
      if (yf<=12&&yf>0){
            shuzu.innerHTML = days[yf- 1];
        }else {
          shuzu.innerHTML ="输入有误！";
      }
    }
</script>
</body>
</html>